package cn.tedu.demo7;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.sql.Connection;
import java.sql.SQLException;

public class Test {
    public static void main(String[] args) throws SQLException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.demo7");
        DBUtil dbutil = context.getBean(DBUtil.class);
        Connection conn = dbutil.getConnection();
        System.out.println(conn);
    }
}
